package node;

public class PolynomialNode<T> {
    private int a = 0;
    private int x = 0;
    private int b = 0;

    PolynomialNode<T> next = null;

    public PolynomialNode() {
    }

    public PolynomialNode(int a, int x, int b) {
        this.a = a;
        this.b = b;
        this.x = x;

    }

    @Override
    public String toString() {
        return a + "x^" + x + "+" + b;
    }


    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getB() {
        return b;
    }

    public void setB(int b) {
        this.b = b;
    }

    public PolynomialNode<T> getNext() {
        return next;
    }

    public void setNext(PolynomialNode<T> next) {
        this.next = next;
    }
}
